import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/table',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
                    meta: { title: '基础表格' }
                },
                {
                    path: '/usertable',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/UserTable.vue'),
                    meta: { title: '用户表格' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
                    meta: { title: '基本表单' }
                },
                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/UploadMv.vue'),
                    meta: { title: '文件上传' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    // 权限页面
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
                    meta: { title: '权限测试', permission: true }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/donate',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
                    meta: { title: '支持作者' }
                },
                {
                    path:'/improve',
                    component: () => import('../components/page/PersonInfo.vue'),
                    meta: { title: '个人信息' }
                },
                {
                    path:'/updatepwd',
                    component: () => import('../components/page/UpdatePwd.vue'),
                    meta: { title: '修改密码' }
                },
                {
                    path:'/addanno',
                    component: () => import('../components/page/Announcement.vue'),
                    meta: { title: '发布公告' }
                },
                {
                    path:'/annolist',
                    component: () => import('../components/page/AnnouncementList.vue'),
                    meta: { title: '公告列表' }
                },
                {
                    path:'/msgrecord',
                    component: () => import('../components/page/MsgList.vue'),
                    meta: { title: '留言记录' }
                },
                {
                    path:'/leavemsg',
                    component: () => import('../components/page/LeaveMsg.vue'),
                    meta: { title: '留言' }
                },
                {
                    path:'/notice',
                    component: () => import('../components/page/Notice.vue'),
                    meta: { title: '消息通知' }
                },
                {
                    // 视频上传组件
                    path: '/uploadmv',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/UploadMv.vue'),
                    meta: { title: '视频上传' }
                },
                {
                    // 视频列表组件
                    path: '/mvlist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/MvList.vue'),
                    meta: { title: '视频列表' }
                },
                {
                    //管理员首页
                    path: '/adminindex',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Adminindex.vue'),
                    meta: { title: '我的首页' }
                },
                {
                    //教练首页
                    path: '/teacherindex',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/TeacherIndex.vue'),
                    meta: { title: '我的首页' }
                },
                {
                    //vip首页
                    path: '/userindex',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/UserIndex.vue'),
                    meta: { title: '我的首页' }
                },
                {
                    path: '/adduser',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/AddUser.vue'),
                    meta: { title: '添加用户' }
                },
                {
                    path: '/userlist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/UserList.vue'),
                    meta: { title: '用户列表' }
                },
                {
                    path: '/addteacher',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/AddTeacher.vue'),
                    meta: { title: '添加教练' }
                },
                {
                    path: '/teacherlist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/TeacherList.vue'),
                    meta: { title: '教练列表' }
                },
                {
                    path: '/addcourse',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/AddCourse.vue'),
                    meta: { title: '新增课程' }
                },
                {
                    path: '/courselist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/CourseList.vue'),
                    meta: { title: '课程列表' }
                },
                {
                    path: '/coursevideo',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/CourseVideo.vue'),
                    meta: { title: '视频列表' }
                },
                {
                    path: '/mvonline',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/MvOnline.vue'),
                    meta: { title: '在线播放' }
                },
                {
                    path: '/teacourse',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/TeaCourse.vue'),
                    meta: { title: '所带课程' }
                },
                {
                    path: '/videodistribution',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/VideoDistribution.vue'),
                    meta: { title: '分配视频' }
                },
                {
                    path: '/importvipexcel',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/importVipExcel.vue'),
                    meta: { title: '导入Vip用户' }
                },
                {
                    path: '/applycard',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/ApplyCard.vue'),
                    meta: { title: '我要办卡' }
                },
                {
                    path: '/cardinfo',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/CardInfo.vue'),
                    meta: { title: '所有卡信息' }
                },
                {
                    path: '/rechargerecord',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/RechargeRecord.vue'),
                    meta: { title: '套餐记录' }
                },
                {
                    path: '/rechargemoney',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/RechargeMoney.vue'),
                    meta: { title: '充值记录' }
                },
                {
                    path: '/vipcourselist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/VipCourseList.vue'),
                    meta: { title: 'Vip课程列表' }
                },
                {
                    path: '/mycourse',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/MyCourse.vue'),
                    meta: { title: '我的课程' }
                },
                {
                    path: '/coursevip',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/CourseVip.vue'),
                    meta: { title: '我的课程' }
                },
                {
                    path: '/teacourselist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/TeaCourseList.vue'),
                    meta: { title: '教练端课程列表' }
                },
                {
                    path: '/coursedistribution',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/CourseDistribution.vue'),
                    meta: { title: '分配课程' }
                },
                {
                    path: '/paymentlist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/PaymentList.vue'),
                    meta: { title: '充值列表' }
                },
                {
                    path: '/makecardlist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/MakecardList.vue'),
                    meta: { title: '办卡列表' }
                },
                {
                    path:'/cardservicelist',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/CardServiceList.vue'),
                    meta: { title: '卡务列表' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
